<ion-view title="设置">
    <ion-content has-bouncing="true" class="u9-content">
        <ion-list class="u9-list u9-ios-push" ng-if="data.PushStop">
            <div class="item">
                <p class="text-center">消息通知已关闭</p>
                <p class="divider-ios" ng-if="!data.isIOS"> 请手动开启消息通知</p>
                <p class="divider-ios" ng-if="data.isIOS"> 请在iPhone的 “设置”－“通知”中修改</p>
            </div>

        </ion-list>
        <ion-list class="u9-list">
            <ion-item ng-if="!data.isIOS" class="item-icon-right" on-tap="checkUpdate()">
                版本检查
                <span class="version">{{'V' + data.version}}</span>
                <i class="icon ion-ios-arrow-right"></i>
            </ion-item>
            <ion-item ng-if="data.isIOS" class="item-icon-right">
                当前版本
                <span class="version">{{'V' + data.version}}</span>
            </ion-item>
            <ion-item class="item-icon-right" ng-if="!data.PushStop&&data.isIOS" on-tap="clearBadge()">
                清除通知
                <i class="icon ion-ios-arrow-right"></i>
            </ion-item>
        </ion-list>
        <div ng-if="!data.PushStop">
            <ion-list class="u9-list" >
                <ion-toggle ng-if="data.isIOS" ng-change="switchMute(data.mute)" ng-model="data.mute.IsOpen" ng-check="data.mute.IsOpen">静音设置</ion-toggle>
                <ion-toggle ng-change="switchMute(data.GlobalSwitch)" ng-if="data.GlobalSwitch" ng-check="data.GlobalSwitch.IsOpen" ng-model="data.GlobalSwitch.IsOpen" >{{data.GlobalSwitch.name}}</ion-toggle>
            </ion-list>
            <div ng-if="data.msgExpand">
                <ion-list class="u9-list msg-list" >
                    <ion-toggle class="msg-toggle" ng-if="data.msg[200010]" ng-change="switchNote(data.msg[200010])" ng-model="data.msg[200010].IsOpen" ng-check="data.msg[0].IsOpen">{{data.msg[200010].name}}</ion-toggle>
                    <ion-toggle class="msg-toggle" ng-if="data.msg[100003]" ng-change="switchNote(data.msg[100003])" ng-model="data.msg[100003].IsOpen" ng-check="data.msg[1].IsOpen">{{data.msg[100003].name}}</ion-toggle>
                </ion-list>
                <ion-list class="u9-list msg-list">
                    <ion-toggle class="msg-toggle" ng-if="data.msg[100005]" ng-change="switchNote(data.msg[100005])" ng-model="data.msg[100005].IsOpen" ng-check="data.msg[100005].IsOpen">{{data.msg[100005].name}}</ion-toggle>
                    <ion-toggle class="msg-toggle" ng-if="data.msg[100007]" ng-change="switchNote(data.msg[100007])" ng-model="data.msg[100007].IsOpen" ng-check="data.msg[100007].IsOpen">{{data.msg[100007].name}}</ion-toggle>
                    <ion-toggle class="msg-toggle" ng-if="data.msg[100002]" ng-change="switchNote(data.msg[100002])" ng-model="data.msg[100002].IsOpen" ng-check="data.msg[100002].IsOpen">{{data.msg[100002].name}}</ion-toggle>
                </ion-list>
                <ion-list class="u9-list msg-list">
                    <ion-toggle class="msg-toggle" ng-if="data.msg[100001]" ng-change="switchNote(data.msg[100001])" ng-model="data.msg[100001].IsOpen" ng-check="data.msg[100001].IsOpen">{{data.msg[100001].name}}</ion-toggle>
                    <ion-toggle class="msg-toggle" ng-if="data.msg[100016]" ng-change="switchNote(data.msg[100016])" ng-model="data.msg[100016].IsOpen" ng-check="data.msg[100016].IsOpen">{{data.msg[100016].name}}</ion-toggle>
                    <ion-toggle class="msg-toggle" ng-if="data.msg[100013]" ng-change="switchNote(data.msg[100013])" ng-model="data.msg[100013].IsOpen" ng-check="data.msg[100013].IsOpen">{{data.msg[100013].name}}</ion-toggle>
                </ion-list>
                <ion-list class="u9-list msg-list">
                    <ion-toggle class="msg-toggle" ng-if="data.msg[100012]" ng-change="switchNote(data.msg[100012])" ng-model="data.msg[100012].IsOpen" ng-check="data.msg[100012].IsOpen">{{data.msg[100012].name}}</ion-toggle>
                    <ion-toggle class="msg-toggle" ng-if="data.msg[100014]" ng-change="switchNote(data.msg[100014])" ng-model="data.msg[100014].IsOpen" ng-check="data.msg[100014].IsOpen">{{data.msg[100014].name}}</ion-toggle>
                    <ion-toggle class="msg-toggle" ng-if="data.msg[100018]" ng-change="switchNote(data.msg[100018])" ng-model="data.msg[100018].IsOpen" ng-check="data.msg[100018].IsOpen">{{data.msg[100018].name}}</ion-toggle>
                </ion-list>
            </div>
        </div>


    </ion-content>
</ion-view>